{% extends "base.html" %}
{% load static %}

{% block content %}

<div class="row m-t-15">
  <div class="col s12 m8 offset-m2">
    {% if next %}
    {% include 'core/contas-gratuitas.html' %}
    {% endif %}
    <h4>Cadastre-se</h4>

    <form method="post">
      {% csrf_token %}

      {{ form.username.errors }}
      <label for="id_username"> Usuário: </label>
      {{ form.username }}


      {{ form.email.errors }}
      <label for="id_email"> Email: </label>
      {{ form.email }}


      {{ form.password1.errors }}
      <label for="id_password1"> Senha: </label>
      {{ form.password1 }}


      {{ form.password2.errors }}
      <label for="id_password2"> Confirmação de senha: </label>
      {{ form.password2 }}

      <label>
        {{ form.subscribe_newsletter }}
        <span> Deseja assinar nossa newsletter? </span>
      </label>

      {{ form.captcha }}

      <p class="valign-wrapper">
        Saiba das nossas novidades rapidamente:
        &nbsp;
        <a href="https://t.me/brasil_io" title="Ir ao Telegram do Brasil.IO">
          <img src="{% static 'img/logo-telegram.png' %}" style="height: 2em" alt="Logo Telegram">
        </a>
        &nbsp;
        <a href="https://t.me/brasil_io">assine nosso canal no Telegram</a>
      </p>

      <div class="text-center m-t-10">
        {% if next %}
        <input type="hidden" name="next" value="{{ next }}" />
        {% endif %}
        <input class='btn' type="submit" value="Salvar" />
      </div>

    </form>
  </div>
</div>

{% endblock %}
